﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the GNU General Public License version 2 (GPLv2).
// See accompanying file License.txt or copy at http://phuse.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Phuse.Net.Nntp
{
    /// <summary>Is the base class of all responses that contain the identifiers (article number and message-id) of a
    /// single article.</summary>
    /// <typeparam name="TMostDerived">The most-derived subclass of this type.</typeparam>
    /// <threadsafety static="true" instance="false"/>
    public abstract class ArticleIdResponse<TMostDerived> : Response<TMostDerived>
        where TMostDerived : ArticleIdResponse<TMostDerived>
    {
        private readonly long number;
        private readonly string messageId;

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>Gets the number of the article.</summary>
        public long Number
        {
            get { return this.number; }
        }

        /// <summary>Gets the message-id of the article.</summary>
        public string MessageId
        {
            get { return this.messageId; }
        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        internal ArticleIdResponse(long number, string messageId)
        {
            this.number = number;
            this.messageId = messageId;
        }
    }
}
